import request from '@/utils/request'

// 查询个人预约就诊列表
export function listLXHDOCappointment(query) {
  return request({
    url: '/LXHappointment/LXHDOCappointment/list',
    method: 'get',
    params: query
  })
}

// 校验用户是否有签约团队
export function checkUserHasContract(userId) {
  return request({
    url: '/LXHappointment/LXHDOCappointment/checkUserHasContract',
    method: 'get',
    params: { userId }
  })
}

// 查询个人预约就诊详细
export function getLXHDOCappointment(appId) {
  return request({
    url: '/LXHappointment/LXHDOCappointment/' + appId,
    method: 'get'
  })
}

// 新增个人预约就诊
export function addLXHDOCappointment(data) {
  return request({
    url: '/LXHappointment/LXHDOCappointment',
    method: 'post',
    data: data
  })
}

// 修改个人预约就诊
export function updateLXHDOCappointment(data) {
  return request({
    url: '/LXHappointment/LXHDOCappointment',
    method: 'put',
    data: data
  })
}

// 删除个人预约就诊
export function delLXHDOCappointment(appId) {
  return request({
    url: '/LXHappointment/LXHDOCappointment/' + appId,
    method: 'delete'
  })
}
